package com.college.common.pojo.model.format;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author 小C工作室
 */
@Data
@AllArgsConstructor
@ApiModel("时间查询请求参数")
public class TimeQueryDTO {

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "起始时间")
	private String startDate;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "结束时间")
	private String endDate;

	/**
	 * 是否为超级管理员
	 */
	private Boolean hasAdmin;

	/**
	 * 是否做时间限制
	 */
	private Boolean hasTimeBox;

	/**
	 * 是否为精确查询
	 */
	private Boolean hasPreciseSelect;

	public TimeQueryDTO() {
		this.hasPreciseSelect = false;
	}

	/**
	 * 判断设置是否精确查询的方法
	 */
	public void judgePreciseSelect() {

	}

	public TimeQueryDTO(String startDate, String endDate) {
		this.startDate = startDate;
		this.endDate = endDate;
	}
}
